package com.lagou.service.impl;

import com.lagou.domain.Employee;
import com.lagou.mapper.EmpMapper;
import com.lagou.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class EmpServiceImpl implements EmpService {


    @Autowired
    EmpMapper empMapper;


    @Override
    public List<Employee> findAll() {
        return empMapper.findAll();
    }

    @Override
    public void add(Employee employee) {
         empMapper.add(employee);
    }
}
